module array_query_fn ;

bit [42:40] [23:20] arr [25:27] [17:10] [5:0] ;

initial
begin
   $display("bit [42:40] [23:20] arr [25:27] [17:10] [5:0]");
   $display("$left %0d, $right %0d, $low %0d, $high %0d", $left(arr),
                                   $right(arr), $low(arr), $high(arr) );
   $display("$increment %d, $size %d, $dimensions %0d", $increment(arr),
                                   $size(arr), $dimensions(arr) );

   arr[25][15][4][42][23] = '1 ;
   arr[25][15][4][42][3] = '1 ; // out of index element
   
   $display("Element arr[25][15][4][42][23] is %d", arr[25][15][4][42][23] );
   $display("Element arr[25][15][4][42][3] is %d", arr[25][15][4][42][3] ); // out of index defaults to uninitialized value
                                                                            // in this case, it is set to 0; but no error!!
end

endmodule
